<?php
/**
 * Created by PhpStorm.
 * User: soharos
 * Date: 16/5/11
 * Time: 下午4:01
 */
$dirList = explode ( '/', $_SERVER ['PHP_SELF'] );
$document_root = $_SERVER ["DOCUMENT_ROOT"];
require "$document_root/$dirList[1]/conf/conf.php";

$connMng = new ConnManger ( $db_conf, $mem_conf );
$connStep = $connMng->getConn_step ();

// 清空每日步数每日积分
Step_count_DAO::initDayStep($connStep);
Step_count_DAO::initDayAchieve($connStep);

//更新上个最高步数记录
$step_mem_day_list = Step_count_DAO::getList($connStep);
foreach ($step_mem_day_list as $step_mem_record) {
    $StepTop = $step_mem_record->getStepTop();
    $id = $step_mem_record->getId();
    Step_count_DAO::initStepTop($StepTop,$id,$connStep);
}
echo "ok";